<h1>Total Bonus</h1>
<?php
$this->renderPartial('application.modules.member.views.main.info');
?>
<br />
<h2>Total Bonus Anda</h2>
<div class="list">
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th rowspan="3">Jenis Bonus</th>
            <th rowspan="3" width="100">Bonus Diperoleh</th>
            <th colspan="3">Bonus Direkap (E-Wallet) <font color="aa0000">*</font></th>
        </tr>
        <tr>
            <th rowspan="2" width="100">Utama (80%)</th>
            <th colspan="2" width="100">Alokasi Produk (20%)</th>
        </tr>
        <tr>
            <th width="100">Produk</th>
            <th width="100">Voucher</th>
        </tr>
        <tr>
            <td><strong>Bonus Sponsor</strong></td>
            <td align="right"><?php echo number_format($summary['sponsor_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['sponsor']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['sponsor']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['sponsor']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Extra Sponsor</strong></td>
            <td align="right"><?php echo number_format($summary['extra_sponsor_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['extra_sponsor']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['extra_sponsor']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['extra_sponsor']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Royalti Produk</strong></td>
            <td align="right"><?php echo number_format($summary['gen_node_products_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['gen_node_products']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['gen_node_products']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['gen_node_products']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Royalti Angsuran</strong></td>
            <td align="right"><?php echo number_format($summary['royalti_angsuran_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['royalti_angsuran']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['royalti_angsuran']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['royalti_angsuran']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Prestasi Distributor</strong></td>
            <td align="right"><?php echo number_format($summary['gen_node_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['gen_node']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['gen_node']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['gen_node']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Prestasi Warehouse</strong></td>
            <td align="right"><?php echo number_format($summary['gen_node_extra_warehouse_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['gen_node_extra_warehouse']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['gen_node_extra_warehouse']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['gen_node_extra_warehouse']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Couple/Pasangan</strong></td>
            <td align="right"><?php echo number_format($summary['match_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['match']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['match']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['match']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Sharing Couple</strong></td>
            <td align="right"><?php echo number_format($summary['gen_match_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['gen_match']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['gen_match']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['gen_match']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Spillover</strong></td>
            <td align="right"><?php echo number_format($summary['matrix_node_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['matrix_node']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['matrix_node']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['matrix_node']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Prestasi Factory</strong></td>
            <td align="right"><?php echo number_format($summary['gen_node_extra_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['gen_node_extra']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['gen_node_extra']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['gen_node_extra']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Level Board</strong></td>
            <td align="right"><?php echo number_format($summary['board_level_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['board_level']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['board_level']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['board_level']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Cycle Board</strong></td>
            <td align="right"><?php echo number_format($summary['board_fly_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['board_fly']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['board_fly']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['board_fly']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus DRP</strong></td>
            <td align="right"><?php echo number_format($summary['sponsor_upgrade_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['sponsor_upgrade']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['sponsor_upgrade']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['sponsor_upgrade']); ?></td>
        </tr>
        <tr class="title">
            <td><strong>TOTAL</strong></td>
            <td align="right"><?php echo number_format($summary['total_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_cash['total_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_products['total_bonus']); ?></td>
            <td align="right"><?php echo number_format($ewallet_voucher['total_bonus']); ?></td>
        </tr>
    </table>
</div>
<div style="margin-top:5px;"><small><i><font color="aa0000">* Bonus Direkap (E-Wallet) adalah akumulasi bonus yang masuk ke E-Wallet setelah dipotong PPh dan Admin Fee.</font></i></small></div>
<br /><br /><br />
<h2>Bonus Anda Hari Ini</h2>
<div class="list">
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th>Jenis Bonus</th>
            <th width="220">Bonus</th>
        </tr>
        <tr>
            <td><strong>Bonus Sponsor</strong></td>
            <td align="right"><?php echo number_format($today['sponsor_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Extra Sponsor</strong></td>
            <td align="right"><?php echo number_format($today['extra_sponsor_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Royalti Produk</strong></td>
            <td align="right"><?php echo number_format($today['gen_node_products_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus DRP</strong></td>
            <td align="right"><?php echo number_format($today['sponsor_upgrade_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Prestasi Distributor</strong></td>
            <td align="right"><?php echo number_format($today['gen_node_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Pasangan</strong></td>
            <td align="right"><?php echo number_format($today['match_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Sharing Couple</strong></td>
            <td align="right"><?php echo number_format($today['gen_match_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Spiilover</strong></td>
            <td align="right"><?php echo number_format($today['matrix_node_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Prestasi Warehouse</strong></td>
            <td align="right"><?php echo number_format($today['gen_node_extra_warehouse_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Prestasi Factory</strong></td>
            <td align="right"><?php echo number_format($today['gen_node_extra_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Level Board</strong></td>
            <td align="right"><?php echo number_format($today['board_level_bonus']); ?></td>
        </tr>
        <tr>
            <td><strong>Bonus Cycle Board</strong></td>
            <td align="right"><?php echo number_format($today['board_fly_bonus']); ?></td>
        </tr>
        <tr class="title">
            <td><strong>TOTAL</strong></td>
            <td align="right"><?php echo number_format($today['total_bonus']); ?></td>
        </tr>
    </table>
</div>